﻿@model Model.ViewModel.RoleViewModel

<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>

@using (Html.BeginForm("Add", "Role", FormMethod.Post))
{
    <table style="width: 100%">
        @Html.HiddenFor(m=>m.rId)
        <tr>
            <td>@Html.LabelFor(m => m.rName)</td>
            <td>@Html.TextBoxFor(m => m.rName)</td>
            <td>@Html.ValidationMessageFor(m => m.rName)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(m => m.rDepId)</td>
            <td>@Html.DropDownListFor(m => m.rDepId, ViewBag.DepartmentList as IEnumerable<SelectListItem>)</td>
            <td>@Html.ValidationMessageFor(m => m.rDepId)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(m => m.rRemark)</td>
            <td>@Html.TextBoxFor(m => m.rRemark)</td>
            <td>@Html.ValidationMessageFor(m => m.rRemark)</td>
        </tr>
    </table>
    <input type="submit" value="Submit"/>
}
